home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / ISSUE20 / CLINIC / NEWCHK1.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1997-01-27  |  528 b   |  29 lines

  1. unit NewChk1;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  7.   Forms, Dialogs, StdCtrls;
  8.  
  9. type
  10.   TNewCheck1 = class(TCheckBox)
  11.   public
  12.     procedure CNKeyDown(var Msg: TWMKeyDown);
  13.       message cn_KeyDown;
  14.   end;
  15.  
  16. implementation
  17.  
  18. procedure TNewCheck1.CNKeyDown(var Msg: TWMKeyDown);
  19. begin
  20.   with Msg do
  21.     if CharCode in [vk_Up, vk_Down] then
  22.       { Return 0 to stop the keystrokes being "absorbed" }
  23.       Result := 0
  24.     else
  25.       inherited
  26. end;
  27.  
  28. end.
  29.